Same issue as the previous commit, int+float is error, and pow() only
works on floats.
float b = 1.0/distance (pos, p2);
float sum = r + g + b;
- float alpha = 1.0 - pow (1.0/(sum), 40)*pow (10.0, 40*0.7);
+ float alpha = 1.0 - pow (1.0/(sum), 40.0)*pow (10.0, 40.0*0.7);
fragColor = vec4 (r*0.5, g*0.5, b*0.5, 1.0) * alpha;
}
float df(vec2 p, float scale, inout vec2 nn) {
p /= scale;
nn = hextile(p);
- nn = round(nn);
+ nn = floor(nn + 0.5);
float r = hash(nn);
float d;;
float df(vec2 p, float scale, inout vec2 nn) {
p /= scale;
nn = hextile(p);
- nn = round(nn);
+ nn = floor(nn + 0.5);
float r = hash(nn);
float d;;
float propagation_length = time * wave_speed;
float t = (propagation_length - distance_from_center) / wave_length;
- float offset_magnitude = 0;
+ float offset_magnitude = 0.0;
if (t > 0.0)
offset_magnitude = decay(wave_height * sin(t * 2.0 * PI), t);